home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / autose1g / frmconfi.frm (.txt) < prev    next >
Visual Basic Form  |  1999-06-11  |  6KB  |  208 lines

  1. VERSION 5.00
  2. Begin VB.Form frmConfigure 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Configure Default Settings"
  6.    ClientHeight    =   4305
  7.    ClientLeft      =   1620
  8.    ClientTop       =   1530
  9.    ClientWidth     =   5955
  10.    Icon            =   "frmConfigure.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    PaletteMode     =   1  'UseZOrder
  15.    ScaleHeight     =   4305
  16.    ScaleWidth      =   5955
  17.    ShowInTaskbar   =   0   'False
  18.    Begin VB.CommandButton cmdConfigure 
  19.       Caption         =   "OK"
  20.       Default         =   -1  'True
  21.       Height          =   360
  22.       Left            =   2160
  23.       TabIndex        =   6
  24.       Top             =   3645
  25.       Width           =   1335
  26.    End
  27.    Begin VB.Frame Frame3 
  28.       BackColor       =   &H00000000&
  29.       Caption         =   "Appearance"
  30.       BeginProperty Font 
  31.          Name            =   "MS Sans Serif"
  32.          Size            =   9.75
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       ForeColor       =   &H0000FFFF&
  40.       Height          =   1230
  41.       Left            =   1215
  42.       TabIndex        =   1
  43.       Top             =   2115
  44.       Width           =   3435
  45.       Begin VB.OptionButton optViewInWindow 
  46.          BackColor       =   &H00000000&
  47.          Caption         =   "View Game in Window"
  48.          ForeColor       =   &H0000FF00&
  49.          Height          =   285
  50.          Left            =   270
  51.          TabIndex        =   5
  52.          Top             =   765
  53.          Width           =   2085
  54.       End
  55.       Begin VB.OptionButton optFullScreen 
  56.          BackColor       =   &H00000000&
  57.          Caption         =   "Full Screen"
  58.          ForeColor       =   &H0000FF00&
  59.          Height          =   285
  60.          Left            =   270
  61.          TabIndex        =   4
  62.          Top             =   315
  63.          Width           =   1635
  64.       End
  65.    End
  66.    Begin VB.Frame Frame1 
  67.       BackColor       =   &H00000000&
  68.       Caption         =   "Sound"
  69.       BeginProperty Font 
  70.          Name            =   "MS Sans Serif"
  71.          Size            =   9.75
  72.          Charset         =   0
  73.          Weight          =   400
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       ForeColor       =   &H0000FFFF&
  79.       Height          =   1230
  80.       Left            =   1215
  81.       TabIndex        =   0
  82.       Top             =   855
  83.       Width           =   3435
  84.       Begin VB.OptionButton optSoundOFF 
  85.          BackColor       =   &H00000000&
  86.          Caption         =   "OFF"
  87.          ForeColor       =   &H0000FF00&
  88.          Height          =   285
  89.          Left            =   360
  90.          TabIndex        =   3
  91.          Top             =   765
  92.          Width           =   2715
  93.       End
  94.       Begin VB.OptionButton optSoundON 
  95.          BackColor       =   &H00000000&
  96.          Caption         =   "ON"
  97.          ForeColor       =   &H0000FF00&
  98.          Height          =   285
  99.          Left            =   360
  100.          TabIndex        =   2
  101.          Top             =   360
  102.          Width           =   2445
  103.       End
  104.    End
  105.    Begin VB.Label Label1 
  106.       BackColor       =   &H00000000&
  107.       Caption         =   "Configure Default Options"
  108.       BeginProperty Font 
  109.          Name            =   "MS Sans Serif"
  110.          Size            =   12
  111.          Charset         =   0
  112.          Weight          =   700
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       ForeColor       =   &H0000FF00&
  118.       Height          =   330
  119.       Left            =   1350
  120.       TabIndex        =   7
  121.       Top             =   315
  122.       Width           =   3255
  123.    End
  124.    Begin VB.Image Image4 
  125.       Height          =   225
  126.       Left            =   225
  127.       Picture         =   "frmConfigure.frx":0442
  128.       Stretch         =   -1  'True
  129.       Top             =   0
  130.       Width           =   5520
  131.    End
  132.    Begin VB.Image Image3 
  133.       Height          =   225
  134.       Left            =   225
  135.       Picture         =   "frmConfigure.frx":4714
  136.       Stretch         =   -1  'True
  137.       Top             =   4095
  138.       Width           =   5520
  139.    End
  140.    Begin VB.Image Image2 
  141.       Height          =   4290
  142.       Left            =   5715
  143.       Picture         =   "frmConfigure.frx":89E6
  144.       Stretch         =   -1  'True
  145.       Top             =   0
  146.       Width           =   240
  147.    End
  148.    Begin VB.Image Image1 
  149.       Height          =   4290
  150.       Left            =   0
  151.       Picture         =   "frmConfigure.frx":C308
  152.       Stretch         =   -1  'True
  153.       Top             =   -45
  154.       Width           =   240
  155.    End
  156. Attribute VB_Name = "frmConfigure"
  157. Attribute VB_GlobalNameSpace = False
  158. Attribute VB_Creatable = False
  159. Attribute VB_PredeclaredId = True
  160. Attribute VB_Exposed = False
  161. Option Explicit
  162. Private Sub Command1_Click()
  163. Unload Me
  164. End Sub
  165. Private Sub cmdConfigure_Click()
  166. If optSoundON Then
  167.     SoundOn = True
  168.     SoundOn = False
  169. End If
  170. If optFullScreen Then
  171.     DefaultGameSize = 2
  172.     frmGameScreen.WindowState = 2   'maximized
  173.     DefaultGameSize = 0
  174.     frmGameScreen.WindowState = 0   'normal
  175. End If
  176. 'write a new config file
  177. Dim Filename As String
  178. Dim ShortName As String
  179. ShortName = "\4000cfg.txt"
  180. Filename = App.Path & ShortName
  181. 'get a free file number
  182. gFileNum = FreeFile
  183. 'create the file
  184. Open Filename For Output As gFileNum
  185. 'write new default options
  186. Write #gFileNum, optSoundON, DefaultGameSize
  187. 'close the file
  188. Close gFileNum
  189. Unload Me
  190. End Sub
  191. Private Sub Form_Load()
  192. 'disable the X button on the control box
  193. Call DisableX(Me)
  194. 'set option buttons as per existing configuration
  195. If SoundOn Then
  196.     optSoundON = True
  197.     optSoundON = False
  198. End If
  199. If frmGameScreen.WindowState = vbMaximized Then
  200.     optFullScreen = True
  201.     optViewInWindow = False
  202.     optFullScreen = False
  203.     optViewInWindow = True
  204. End If
  205. End Sub
  206. Private Sub Option1_Click()
  207. End Sub
  208.